//
//  ThirdSalesTableViewCell.m
//  ZiJinLian
//
//  Created by 🐛 on 2017/6/3.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import "ThirdSalesTableViewCell.h"

@implementation ThirdSalesTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle=0;
    self.isHave=NO;
    self.logistView.hidden=YES;
    self.btnClick.layer.borderWidth=0.8;
    self.btnClick.layer.borderColor=TextColor9.CGColor;
    ViewRadius(self.btnClick, 2);
    // Initialization code
}
-(void)creatPictureView:(NSArray *)aaray{
    self.imageArray=aaray;
    if ((10+90*aaray.count)>(MainW-100)) {
        self.scroll.contentSize=CGSizeMake((10+90*aaray.count)+100, 80);
    }
    if (aaray.count==5) {
        self.scroll.contentSize=CGSizeMake(460, 80);
    }
    if (self.isHave==NO) {
        for (int i=0; i<aaray.count; i++) {
           
            self.image=[[UIImageView alloc]initWithFrame:CGRectMake(10+90*i, 5, 80, 80)];
            [self.image sd_setImageWithURL:[NSURL URLWithString:aaray[i]] placeholderImage:[UIImage imageNamed:@"placeholderImage"]];
            [self.scroll addSubview:self.image];
            UIButton *but=[[UIButton alloc]initWithFrame:CGRectMake(10+90*i, 5, 80, 80)];
            [but addTarget:self action:@selector(didSelectCancelBtn) forControlEvents:UIControlEventTouchUpInside];
            [self.scroll addSubview:but];
            self.isHave=YES;
        }
        
    }
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)didSelectCancelBtn{
    ZYBrowerView *browerView = [[ZYBrowerView alloc] initWithFrame:[UIScreen mainScreen].bounds imagesUrlAry:self.imageArray currentIndex:0];
    [browerView show];
}
- (IBAction)ContactMerchantClick:(UIButton *)sender {
    
}

@end
